<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />

    

    
    <title>nginx入门 | welcome</title>
    
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="keywords" content="" />
    
    <meta name="description" content="Nginx学习什么是Nginx？​    Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器，同时也提供了IMAP&#x2F;POP3&#x2F;SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点（俄文：Рамблер）开发的，第一个公开版本0.1.0发布于2004年10月4日。​    其将源代码以类BSD许可证的形式发布，因它的稳定性、丰富的功能">
<meta property="og:type" content="article">
<meta property="og:title" content="nginx入门">
<meta property="og:url" content="https://hchdream.gitee.io/hexo/2021/01/29/nginx/index.html">
<meta property="og:site_name" content="welcome">
<meta property="og:description" content="Nginx学习什么是Nginx？​    Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器，同时也提供了IMAP&#x2F;POP3&#x2F;SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点（俄文：Рамблер）开发的，第一个公开版本0.1.0发布于2004年10月4日。​    其将源代码以类BSD许可证的形式发布，因它的稳定性、丰富的功能">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://hchdream.gitee.io/images/img/portfolio/08-large.jpg">
<meta property="article:published_time" content="2021-01-28T16:00:00.000Z">
<meta property="article:modified_time" content="2021-01-29T06:40:50.876Z">
<meta property="article:author" content="XiaoHuang">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://hchdream.gitee.io/images/img/portfolio/08-large.jpg">
    

    
        <link rel="alternate" href="/atom.xml" title="welcome" type="application/atom+xml" />
    

    
        <link rel="icon" href="/hexo/css/images/favicon.ico" />
    

    
<link rel="stylesheet" href="/hexo/libs/font-awesome/css/font-awesome.min.css">

    
<link rel="stylesheet" href="/hexo/libs/titillium-web/styles.css">

    
<link rel="stylesheet" href="/hexo/libs/source-code-pro/styles.css">


    
<link rel="stylesheet" href="/hexo/css/style.css">


    
<script src="/hexo/libs/jquery/3.5.0/jquery.min.js"></script>

    
    
        
<link rel="stylesheet" href="/hexo/libs/lightgallery/css/lightgallery.min.css">

    
    
        
<link rel="stylesheet" href="/hexo/libs/justified-gallery/justifiedGallery.min.css">

    
    
    
    


<meta name="generator" content="Hexo 5.2.0"></head>

<body>
    <div id="wrap">
        <header id="header">
    <div id="header-outer" class="outer">
        <div class="container">
            <div class="container-inner">
                <div id="header-title">
                    <h1 class="logo-wrap">
                        <a href="/hexo/" class="logo"></a>
                    </h1>
                    
                </div>
                <div id="header-inner" class="nav-container">
                    <a id="main-nav-toggle" class="nav-icon fa fa-bars"></a>
                    <div class="nav-container-inner">
                        <ul id="main-nav">
                            
                                <li class="main-nav-list-item" >
                                    <a class="main-nav-list-link" href="/hexo/">主页</a>
                                </li>
                            
                                    <ul class="main-nav-list"><li class="main-nav-list-item"><a class="main-nav-list-link" href="/hexo/categories/Java/">Java</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/hexo/categories/Spring/">Spring</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/hexo/categories/nginx/">nginx</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/hexo/categories/springcloud/">springcloud</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/hexo/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/">数据库</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/hexo/categories/%E9%95%9C%E5%83%8F%E5%8A%A0%E9%80%9F/">镜像加速</a></li><li class="main-nav-list-item"><a class="main-nav-list-link" href="/hexo/categories/%E9%A1%B9%E7%9B%AE/">项目</a></li></ul>
                                
                                <li class="main-nav-list-item" >
                                    <a class="main-nav-list-link" href="/hexo/about/index.html">关于</a>
                                </li>
                            
                        </ul>
                        <nav id="sub-nav">
                            <div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="搜索" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="想要查找什么..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(未命名)',
        },
        ROOT_URL: '/hexo/',
        CONTENT_URL: '/hexo/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/hexo/js/insight.js"></script>


</div>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>

        <div class="container">
            <div class="main-body container-inner">
                <div class="main-body-inner">
                    <section id="main">
                        <div class="main-body-header">
    <h1 class="header">
    
    <a class="page-title-link" href="/hexo/categories/nginx/">nginx</a>
    </h1>
</div>

                        <div class="main-body-content">
                            <article id="post-nginx" class="article article-single article-type-post" itemscope itemprop="blogPost">
    <div class="article-inner">
        
            <header class="article-header">
                
    
        <h1 class="article-title" itemprop="name">
        nginx入门
        </h1>
    

            </header>
        
        
            <div class="article-meta">
                
  <div class="article-date">
    <i class="fa fa-calendar"></i>
    <a href="/hexo/2021/01/29/nginx/" class="article-date">
       <time datetime="2021-01-28T16:00:00.000Z" itemprop="datePublished">2021-01-29</time>
    </a>
  </div>


<div class="article-date">
  <i class="fa fa-calendar-plus-o"></i>
  <a href="/hexo/2021/01/29/nginx/" class="article-date">
     <time datetime="2021-01-29T06:40:50.876Z" itemprop="dateModified">2021-01-29</time>
  </a>
</div>


                

                
                

                

            </div>
        
        
        <div class="article-entry" itemprop="articleBody">
            

            

            

            <p><img src="http://hchdream.gitee.io/images/img/portfolio/08-large.jpg"></p>
<h1 id="Nginx学习"><a href="#Nginx学习" class="headerlink" title="Nginx学习"></a>Nginx学习</h1><h2 id="什么是Nginx？"><a href="#什么是Nginx？" class="headerlink" title="什么是Nginx？"></a>什么是Nginx？</h2><p>​    Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器，同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点（俄文：Рамблер）开发的，第一个公开版本0.1.0发布于2004年10月4日。<br>​    其将源代码以类BSD许可证的形式发布，因它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名。2011年6月1日，nginx 1.0.4发布。<br>​    Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件（IMAP/POP3）代理服务器，在BSD-like 协议下发行。其特点是占有内存少，并发能力强，事实上nginx的并发能力在同类型的网页服务器中表现较好，中国大陆使用nginx网站用户有：百度、京东、新浪、网易、腾讯、淘宝等。</p>
<h2 id="Niginx-优点"><a href="#Niginx-优点" class="headerlink" title="Niginx 优点"></a>Niginx 优点</h2><p>​    Nginx 可以在大多数 Unix Linux OS 上编译运行，并有 Windows 移植版。 Nginx 的1.19.2稳定版已经于2020年8月11日发布，一般情况下，对于新建站点，建议使用最新稳定版作为生产版本，已有站点的升级急迫性不高。Nginx 的源代码使用 2-clause BSD-like license。<br>​    Nginx 是一个很强大的高性能Web和反向代理服务，它具有很多非常优越的特性：<br>​    在连接高并发的情况下，Nginx是Apache服务不错的替代品：Nginx在美国是做虚拟主机生意的老板们经常选择的软件平台之一。能够支持高达 50,000 个并发连接数的响应，感谢Nginx为我们选择了 epoll and kqueue作为开发模型。</p>
<h2 id="Nginx作用？"><a href="#Nginx作用？" class="headerlink" title="Nginx作用？"></a>Nginx作用？</h2><p><code>Http代理，反向代理：作为web服务器最常用的功能之一，尤其是反向代理</code></p>
<p>正向代理： <code>代理客户端</code></p>
<p><img src="/hexo/hexo/2021/01/29/nginx/%E6%AD%A3%E5%90%91%E4%BB%A3%E7%90%86.png" alt="正向代理"></p>
<p>反向代理：<code>代理服务端</code></p>
<p><img src="/hexo/hexo/2021/01/29/nginx/%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86.png" alt="反向代理"></p>
<h2 id="Nginx提供的负载均衡策略"><a href="#Nginx提供的负载均衡策略" class="headerlink" title="Nginx提供的负载均衡策略"></a>Nginx提供的负载均衡策略</h2><p><code>Nginx提供的负载均衡策略有2种：内置策略和扩展策略。内置策略为轮询，加权轮询，IPHash；扩展策略：天马行空？？？</code></p>
<ul>
<li><p>轮询<br><img src="/hexo/hexo/2021/01/29/nginx/%E8%BD%AE%E8%AF%A2.png" alt="轮询"></p>
</li>
<li><p>加权轮询（性能高的服务器可以设置多处理一些请求）<br><img src="/hexo/hexo/2021/01/29/nginx/%E5%8A%A0%E6%9D%83%E8%BD%AE%E8%AF%A2.png" alt="加权轮询"></p>
</li>
<li><p>iphash对客户端请求的ip进行hash操作，然后根据hash结果将同一个客户端IP请求分发到同一台服务器进行处理，可以解决session不共享的问题</p>
<p>同一个ip的请求都在一台服务器上处理，解决session不共享的问题，但是性能还是存在问题，可以用redis来做session共享</p>
<p><img src="/hexo/hexo/2021/01/29/nginx/nignx-iphash.png" alt="iphash"></p>
</li>
<li><p><code>动静分离：</code>在我们的软件开发中，有些请求是需要后台处理的，有些请求是不需要后台处理的（如：css、html、jpg、js等文件），这些不需要经过后台处理的文件称为静态文件。让动态网站的动态网页根据一定的规则把不变的资源和经常变化的资源区分开来，动静资源做好了拆分后，我们就可以根据静态资源的特点将其做缓存操作，提高资源响应的操作。</p>
<p><img src="/hexo/hexo/2021/01/29/nginx/%E5%8A%A8%E9%9D%99%E5%88%86%E7%A6%BB.png" alt="动静分离"></p>
</li>
</ul>
<p>目前，通过使用nginx大大提高了网站的响应速度，优化用户的体验，网站的健壮性也显著提高</p>
<h2 id="Window下的Nginx安装"><a href="#Window下的Nginx安装" class="headerlink" title="Window下的Nginx安装"></a>Window下的Nginx安装</h2><p>在官网下载稳定版，解压即用</p>
<p>默认监听的80端口，在浏览器中输入<code>localhost</code></p>
<p><img src="/hexo/hexo/2021/01/29/nginx/%E5%90%AF%E5%8A%A8nginx.png" alt="启动nginx"></p>
<h2 id="Ubantu下的Nginx安装"><a href="#Ubantu下的Nginx安装" class="headerlink" title="Ubantu下的Nginx安装"></a>Ubantu下的Nginx安装</h2><p>Ubantu支持两种安装方式，一种是apt-get的方式，另一种是根据包安装的方式，推荐使用apt-get方式来安装</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 使用apt-get方式安装nginx</span></span><br><span class="line">apt-get install nginx</span><br><span class="line"><span class="meta">#</span><span class="bash"> 安装成功后，查看nginx版本</span></span><br><span class="line">nginx -v</span><br><span class="line"><span class="meta">#</span><span class="bash"> 启动nginx</span></span><br><span class="line">service nginx start</span><br></pre></td></tr></table></figure>

<p>启动后，在网页重输入ip地址，即可看到nginx的欢迎页面。至此nginx安装成功,如下图</p>
<p><img src="/hexo/hexo/2021/01/29/nginx/linux-%E5%90%AF%E5%8A%A8nginx.png" alt="image-20210129103339594"></p>
<p>nginx文件安装完成之后的文件位置：</p>
<ul>
<li>/usr/sbin/nginx：主程序</li>
<li>/etc/nginx：存放配置文件</li>
<li>/usr/share/nginx：存放静态文件</li>
<li>/var/log/nginx：存放日志</li>
</ul>
<h2 id="Nginx常用命令"><a href="#Nginx常用命令" class="headerlink" title="Nginx常用命令"></a>Nginx常用命令</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">ps aux|grep nginx 	# 查看nigix进程</span><br><span class="line">。/nginx  # 启动</span><br><span class="line">./nginx -s stop # 停止</span><br><span class="line">./nginx -s quit # 安全退出</span><br><span class="line">./nginx -s reload # 重新加载配置文件</span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash"> 检测80端口是否被占用</span></span><br><span class="line">netstat -ano | findstr 0.0.0.0:80</span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash"> 查看nginx是否启动成功</span></span><br><span class="line">tasklist /fi &quot;imagename eq nginx.exe&quot;</span><br></pre></td></tr></table></figure>

<p><img src="/hexo/hexo/2021/01/29/nginx/%E6%9F%A5%E7%9C%8Bnginx%E6%98%AF%E5%90%A6%E5%90%AF%E5%8A%A8%E6%88%90%E5%8A%9F.png" alt="image-20210129134857979"></p>
<h2 id="测试"><a href="#测试" class="headerlink" title="测试"></a>测试</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> create by hch,配置负载均衡</span></span><br><span class="line">	upstream balance&#123;</span><br><span class="line">		server 127.0.0.1:8080 weight=1;</span><br><span class="line">		server 127.0.0.1:8081 weight=1;</span><br><span class="line">	&#125;</span><br><span class="line"></span><br><span class="line">location / &#123;</span><br><span class="line">	proxy_pass http://balance;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>就目前来看，nginx还是比较好上手的，后续有机会上手实际项目就更好了<del>~</del></p>

        </div>
        <footer class="article-footer">
            



    <a data-url="https://hchdream.gitee.io/hexo/2021/01/29/nginx/" data-id="ckqnkn7iq000as8rj6p750os6" class="article-share-link"><i class="fa fa-share"></i>分享到</a>
<script>
    (function ($) {
        $('body').on('click', function() {
            $('.article-share-box.on').removeClass('on');
        }).on('click', '.article-share-link', function(e) {
            e.stopPropagation();

            var $this = $(this),
                url = $this.attr('data-url'),
                encodedUrl = encodeURIComponent(url),
                id = 'article-share-box-' + $this.attr('data-id'),
                offset = $this.offset(),
                box;

            if ($('#' + id).length) {
                box = $('#' + id);

                if (box.hasClass('on')){
                    box.removeClass('on');
                    return;
                }
            } else {
                var html = [
                    '<div id="' + id + '" class="article-share-box">',
                        '<input class="article-share-input" value="' + url + '">',
                        '<div class="article-share-links">',
                            '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
                            '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
                            '<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="article-share-pinterest" target="_blank" title="Pinterest"></a>',
                            '<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="article-share-google" target="_blank" title="Google+"></a>',
                        '</div>',
                    '</div>'
                ].join('');

              box = $(html);

              $('body').append(box);
            }

            $('.article-share-box.on').hide();

            box.css({
                top: offset.top + 25,
                left: offset.left
            }).addClass('on');

        }).on('click', '.article-share-box', function (e) {
            e.stopPropagation();
        }).on('click', '.article-share-box-input', function () {
            $(this).select();
        }).on('click', '.article-share-box-link', function (e) {
            e.preventDefault();
            e.stopPropagation();

            window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
        });
    })(jQuery);
</script>

        </footer>
    </div>
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "BlogPosting",
        "author": {
            "@type": "Person",
            "name": "XiaoHuang"
        },
        "headline": "nginx入门",
        "image": "https://hchdream.gitee.io/hexohttp://hchdream.gitee.io/images/img/portfolio/08-large.jpg",
        "keywords": "",
        "genre": "nginx",
        "datePublished": "2021-01-29",
        "dateCreated": "2021-01-29",
        "dateModified": "2021-01-29",
        "url": "https://hchdream.gitee.io/hexo/2021/01/29/nginx/",
        "description": "
Nginx学习什么是Nginx？​    Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器，同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点（俄文：Рамблер）开发的，第一个公开版本0.1.0发布于2004年10月4日。​    其将源代码以类BSD许可证的形式发布，因它的稳定性、丰富的功能",
        "wordCount": 236
    }
</script>

</article>

    <section id="comments">
    
        
    <div id="disqus_thread">
        <noscript>Please enable JavaScript to view the <a target="_blank" rel="noopener" href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    </div>


    
    </section>



                        </div>
                    </section>
                    <aside id="sidebar">
    <a class="sidebar-toggle" title="Expand Sidebar"><i class="toggle icon"></i></a>
    <div class="sidebar-top">
        <p>关注我 :</p>
        <ul class="social-links">
            
                
                <li>
                    <a class="social-tooltip" title="github" href="https://github.com/hchdream" target="_blank" rel="noopener">
                        <i class="icon fa fa-github"></i>
                    </a>
                </li>
                
            
                
                <li>
                    <a class="social-tooltip" title="rss" href="/hexo/atom.xml" target="_blank" rel="noopener">
                        <i class="icon fa fa-rss"></i>
                    </a>
                </li>
                
            
        </ul>
    </div>
    
        
<nav id="article-nav">
    
        <a href="/hexo/2021/07/03/SpringCloud-Alibaba/" id="article-nav-newer" class="article-nav-link-wrap">
        <strong class="article-nav-caption">下一篇</strong>
        <p class="article-nav-title">
        
            SpringCloud&amp;Alibaba
        
        </p>
        <i class="icon fa fa-chevron-right" id="icon-chevron-right"></i>
    </a>
    
    
        <a href="/hexo/2020/10/29/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B/" id="article-nav-older" class="article-nav-link-wrap">
        <strong class="article-nav-caption">上一篇</strong>
        <p class="article-nav-title">网络编程</p>
        <i class="icon fa fa-chevron-left" id="icon-chevron-left"></i>
        </a>
    
</nav>

    
    <div class="widgets-container">
        
            
                

            
                
    <div class="widget-wrap">
        <h3 class="widget-title">最新文章</h3>
        <div class="widget">
            <ul id="recent-post" class="">
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/hexo/2021/07/03/SpringCloud-Alibaba/" class="thumbnail">
    
    
        <span style="background-image:url(https://w.wallhaven.cc/full/j3/wallhaven-j3wqwm.jpg)" alt="SpringCloud&amp;Alibaba" class="thumbnail-image"></span>
    
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/hexo/categories/springcloud/">springcloud</a></p>
                            <p class="item-title"><a href="/hexo/2021/07/03/SpringCloud-Alibaba/" class="title">SpringCloud&amp;Alibaba</a></p>
                            <p class="item-date"><time datetime="2021-07-03T08:26:10.000Z" itemprop="datePublished">2021-07-03</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/hexo/2021/01/29/nginx/" class="thumbnail">
    
    
        <span style="background-image:url(http://hchdream.gitee.io/images/img/portfolio/08-large.jpg)" alt="nginx入门" class="thumbnail-image"></span>
    
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/hexo/categories/nginx/">nginx</a></p>
                            <p class="item-title"><a href="/hexo/2021/01/29/nginx/" class="title">nginx入门</a></p>
                            <p class="item-date"><time datetime="2021-01-28T16:00:00.000Z" itemprop="datePublished">2021-01-29</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/hexo/2020/10/29/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B/" class="thumbnail">
    
    
        <span style="background-image:url(http://hchdream.gitee.io/images/img/portfolio/10-large.jpg)" alt="网络编程" class="thumbnail-image"></span>
    
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"><a class="article-category-link" href="/hexo/categories/Java/">Java</a></p>
                            <p class="item-title"><a href="/hexo/2020/10/29/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B/" class="title">网络编程</a></p>
                            <p class="item-date"><time datetime="2020-10-29T05:39:12.000Z" itemprop="datePublished">2020-10-29</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/hexo/2020/10/27/%E6%B5%8B%E8%AF%95/" class="thumbnail">
    
    
        <span style="background-image:url(https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2926199504,3558053336&fm=26&gp=0.jpg)" alt="测试" class="thumbnail-image"></span>
    
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"></p>
                            <p class="item-title"><a href="/hexo/2020/10/27/%E6%B5%8B%E8%AF%95/" class="title">测试</a></p>
                            <p class="item-date"><time datetime="2020-10-27T08:16:08.000Z" itemprop="datePublished">2020-10-27</time></p>
                        </div>
                    </li>
                
                    <li>
                        
                        <div class="item-thumbnail">
                            <a href="/hexo/2020/10/27/hello-world/" class="thumbnail">
    
    
        <span style="background-image:url(https://hchdream.gitee.io/images/img/portfolio/04-large.jpg)" alt="Hello World" class="thumbnail-image"></span>
    
    
</a>

                        </div>
                        
                        <div class="item-inner">
                            <p class="item-category"></p>
                            <p class="item-title"><a href="/hexo/2020/10/27/hello-world/" class="title">Hello World</a></p>
                            <p class="item-date"><time datetime="2020-10-27T05:33:45.370Z" itemprop="datePublished">2020-10-27</time></p>
                        </div>
                    </li>
                
            </ul>
        </div>
    </div>

            
                
    <div class="widget-wrap widget-list">
        <h3 class="widget-title">分类</h3>
        <div class="widget">
            <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/hexo/categories/Java/">Java</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/hexo/categories/Spring/">Spring</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/hexo/categories/nginx/">nginx</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/hexo/categories/springcloud/">springcloud</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/hexo/categories/%E6%95%B0%E6%8D%AE%E5%BA%93/">数据库</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/hexo/categories/%E9%95%9C%E5%83%8F%E5%8A%A0%E9%80%9F/">镜像加速</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/hexo/categories/%E9%A1%B9%E7%9B%AE/">项目</a><span class="category-list-count">1</span></li></ul>
        </div>
    </div>


            
                
    <div class="widget-wrap widget-list">
        <h3 class="widget-title">归档</h3>
        <div class="widget">
            <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/hexo/archives/2021/07/">七月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/hexo/archives/2021/01/">一月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/hexo/archives/2020/10/">十月 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/hexo/archives/2020/06/">六月 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/hexo/archives/2020/05/">五月 2020</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/hexo/archives/2020/04/">四月 2020</a><span class="archive-list-count">3</span></li></ul>
        </div>
    </div>


            
                
    <div class="widget-wrap widget-list">
        <h3 class="widget-title">标签</h3>
        <div class="widget">
            <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/AOP/" rel="tag">AOP</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/Collection/" rel="tag">Collection</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/DI/" rel="tag">DI</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/HashMap/" rel="tag">HashMap</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/HashTabel/" rel="tag">HashTabel</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/IOC/" rel="tag">IOC</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/List/" rel="tag">List</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/Map/" rel="tag">Map</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/Set/" rel="tag">Set</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/TreeMap/" rel="tag">TreeMap</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/idea/" rel="tag">idea</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/jdbc/" rel="tag">jdbc</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/jpa/" rel="tag">jpa</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/mybatis/" rel="tag">mybatis</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/mysql/" rel="tag">mysql</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/npm/" rel="tag">npm</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/orm/" rel="tag">orm</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/properties/" rel="tag">properties</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/thymeleaf/" rel="tag">thymeleaf</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/xml/" rel="tag">xml</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/yarn/" rel="tag">yarn</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/%E4%BB%A3%E7%90%86%E6%A8%A1%E5%BC%8F/" rel="tag">代理模式</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/hexo/tags/%E6%B3%9B%E5%9E%8B/" rel="tag">泛型</a><span class="tag-list-count">1</span></li></ul>
        </div>
    </div>


            
                
    <div class="widget-wrap widget-float">
        <h3 class="widget-title">标签云</h3>
        <div class="widget tagcloud">
            <a href="/hexo/tags/AOP/" style="font-size: 10px;">AOP</a> <a href="/hexo/tags/Collection/" style="font-size: 10px;">Collection</a> <a href="/hexo/tags/DI/" style="font-size: 10px;">DI</a> <a href="/hexo/tags/HashMap/" style="font-size: 10px;">HashMap</a> <a href="/hexo/tags/HashTabel/" style="font-size: 10px;">HashTabel</a> <a href="/hexo/tags/IOC/" style="font-size: 10px;">IOC</a> <a href="/hexo/tags/List/" style="font-size: 10px;">List</a> <a href="/hexo/tags/Map/" style="font-size: 10px;">Map</a> <a href="/hexo/tags/Set/" style="font-size: 10px;">Set</a> <a href="/hexo/tags/TreeMap/" style="font-size: 10px;">TreeMap</a> <a href="/hexo/tags/idea/" style="font-size: 20px;">idea</a> <a href="/hexo/tags/jdbc/" style="font-size: 20px;">jdbc</a> <a href="/hexo/tags/jpa/" style="font-size: 10px;">jpa</a> <a href="/hexo/tags/mybatis/" style="font-size: 20px;">mybatis</a> <a href="/hexo/tags/mysql/" style="font-size: 10px;">mysql</a> <a href="/hexo/tags/npm/" style="font-size: 10px;">npm</a> <a href="/hexo/tags/orm/" style="font-size: 10px;">orm</a> <a href="/hexo/tags/properties/" style="font-size: 10px;">properties</a> <a href="/hexo/tags/thymeleaf/" style="font-size: 10px;">thymeleaf</a> <a href="/hexo/tags/xml/" style="font-size: 15px;">xml</a> <a href="/hexo/tags/yarn/" style="font-size: 10px;">yarn</a> <a href="/hexo/tags/%E4%BB%A3%E7%90%86%E6%A8%A1%E5%BC%8F/" style="font-size: 10px;">代理模式</a> <a href="/hexo/tags/%E6%B3%9B%E5%9E%8B/" style="font-size: 10px;">泛型</a>
        </div>
    </div>


            
                
    <div class="widget-wrap widget-list">
        <h3 class="widget-title">链接</h3>
        <div class="widget">
            <ul>
                
                    <li>
                        <a target="_blank" rel="noopener" href="http://hexo.io">Hexo</a>
                    </li>
                
                    <li>
                        <a target="_blank" rel="noopener" href="https://github.com">Github</a>
                    </li>
                
                    <li>
                        <a target="_blank" rel="noopener" href="https://baidu.com">Baidu</a>
                    </li>
                
            </ul>
        </div>
    </div>


            
        
    </div>
</aside>

                </div>
            </div>
        </div>
        <footer id="footer">
    <div class="container">
        <div class="container-inner">
            <a id="back-to-top" href="javascript:;"><i class="icon fa fa-angle-up"></i></a>
            <div class="credit">
                <h1 class="logo-wrap">
                    <a href="/hexo/" class="logo"></a>
                </h1>
                <p>&copy; 2021 XiaoHuang</p>
                
                <p>Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>.</p>
                
            </div>
            <div class="footer-plugins">
              
    


            </div>
        </div>
	</div>
</footer>


    </div>
    
    
    <script>
    var disqus_shortname = 'hexo-theme-hueman';
    
    
    var disqus_url = 'https://hchdream.gitee.io/hexo/2021/01/29/nginx/';
    
    (function() {
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
    </script>





    
        
<script src="/hexo/libs/lightgallery/js/lightgallery.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-thumbnail.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-pager.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-autoplay.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-fullscreen.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-zoom.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-hash.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-share.min.js"></script>

        
<script src="/hexo/libs/lightgallery/js/lg-video.min.js"></script>

    
    
        
<script src="/hexo/libs/justified-gallery/jquery.justifiedGallery.min.js"></script>

    
    

    
    
    



<!-- Custom Scripts -->

<script src="/hexo/js/main.js"></script>


</body>
</html>
